﻿--header CompassEventData
if (exists(
select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'iComply'
and TABLE_NAME='CompassEventData'))
BEGIN
Drop table iComply.CompassEventData
END

GO

 create table iComply.CompassEventData(
Id int not null IDENTITY(1,1),
AggregateId uniqueidentifier NOT NULL,
[TimeStamp] DateTime2 not null,
[Type] nvarchar(500) not null,
[Version] int not null,
Data nvarchar(max) null,
CONSTRAINT PK_CompassEventData PRIMARY KEY (ID)
)
